package personal.xjl.jerrymouse.spring;

import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

public class MyAdvice implements MethodBeforeAdvice, AfterReturningAdvice {
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("-----this is 后置增强-----");
    }

    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("-----this is 前置增强-----");
    }
}
